<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<script type="text/javascript">
$(function(){
	$("#faqAccordion2").accordion({header:"h3", collapsible:true, active:false});
});
function checkDelete(){
	if(confirm("삭제하시겠습니까?")){
		submit();
	}else{
		return false;
	}
}

</script>
<style type="text/css">
	#faqAccordion2{
		width: 910px;
	}
</style>
  	<center>
		<div id="faqAccordion2">
			<c:forEach items="${requestScope.lvo.list }" var="list">
				<h3 align="left"><font color="red">[${list.category}]</font><font color="black"> ${list.title }</font></h3>
  			<div align="left">
					<table>
					<tr>
						<td>
						<textarea style="background-color:transparent; border:0;"cols="73" rows="20" readonly="readonly" id="faqta" >${list.content }</textarea>
						</td>
					</tr>
			</table><br>
			<div align="right">
			<c:if test="${sessionScope.userInfo.grade=='admin'}">
			<a href="${initParam.root}faq.do?command=moveToUpdateBoard&no=${list.no}"><input type="button" value="수정"></a>
			<a href="${initParam.root}faq.do?command=deleteBoard&no=${list.no}"><input type="button" value="삭제" onclick="checkDelete()"></a>
			</c:if>
			</div>
  		</div>
	</c:forEach>
  </div>
</center>
